package com.spring.student.register;

import org.springframework.context.ApplicationContext;
import org.springframework.context.Lifecycle;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Register {
    public static void main(String[] args){
       ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("register.xml");
        Lifecycle lifecycle = (Lifecycle) classPathXmlApplicationContext.getBean("user");
        lifecycle.start();
        classPathXmlApplicationContext.close();
    }
}
